package com.gun.servletComponent;

/**
 * @Authar: 吾图南
 * @Data: 2022/12/10 11:16
 * @Package: com.gun.servletComponent
 * @ClassName: MyListener
 * @Description: TODO 自定义Listener类
 */
import org.springframework.stereotype.Component;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;

@WebListener
//@Component
public class MyListener implements ServletContextListener {
    @Override
    public void contextInitialized(ServletContextEvent servletContextEvent) {
        System.out.println("contextInitialized ...");
    }
    @Override
    public void contextDestroyed(ServletContextEvent servletContextEvent) {
        System.out.println("contextDestroyed ...");
    }
}
